package com.only4play.portal.common.error;

/**
 * @author liyuncong
 * @version 1.0
 * @file PortalErrorException
 * @brief PortalErrorException
 * @details PortalErrorException
 * @date 2024-06-07
 *
 * Edit History
 * ----------------------------------------------------------------------------
 * DATE                     NAME               DESCRIPTION
 * 2024-06-07               liyuncong          Created
 */
public class PortalErrorException extends Exception {
    private final PortalError error;

    public PortalErrorException(String message, PortalError error) {
        super(message);
        this.error = error;
    }

    public PortalErrorException(PortalError error) {
        super(error.getErrorMsg());
        this.error = error;
    }

    public PortalErrorException(PortalError error, Throwable cause) {
        super(error.getErrorMsg(), cause);
        this.error = error;
    }

}
